import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import * as http from "@/http/request.js";
//初始化样式表
// import '@/styles/index.scss'

//全部引入element-plus
// import ElementPlus from 'element-plus';
// import 'element-plus/lib/theme-chalk/index.css';

//按需引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import * as ElIconModules from '@element-plus/icons-vue'

const app = createApp(App)

app.config.globalProperties.$http = http

//全部 use element-plus
//app.use(ElementPlus)

//按需 use element-plus
Object.keys(ElIconModules).forEach(function (key) {
    app.component(ElIconModules[key].name, ElIconModules[key])
})
app.use(ElementPlus)
app.use(store)
app.use(router)
app.mount('#app')